Client-side scripting refers to the type of computer programs that are executed by the user's web browser. JavaScript is the most popular client-side scripting language on the web. Common uses for JavaScript are form validation, generate a pop-up alert box message, creating image gallery, dynamic changes of content, etc.
The <script> element is used to define a client-side script. The script in the example below writes Hello World! to the HTML output:
MYHTML |
|
Welcome to our siteHere you will learn to create websites... |
|
copyright © myyhtml.mywebcommunity.org |
Tip:Ideally, scripts should be placed at the bottom of the page, because scripts block parallel downloads. That will make your web pages load faster.
You can also place your scripts into a separate file, and then call that file through the src attribute in your HTML document. This is useful if you want the same scripts available to multiple documents — it saves you from repeating the same task over and over again, and makes your website much easier to maintain.
The <noscript>
element is used to provide an alternate content for users that have either disabled scripts in their browser or have a browser that doesn't support client-side scripting.
The noscript element can contain all the HTML elements that you'd include inside the <body>
element of a normal HTML page.
Note:The content inside the noscript
element will only be displayed if scripts are not supported, or are disabled in the user's browser.
How Many People Visit |
|